import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const router = new VueRouter({
    routes: []
});

// 路由前置导航守卫
router.beforeEach((to, from, next)=>{
    if (to.path === "/login") {
        return next();
    }
})

// 路由后置导航守卫
router.afterEach((to, from)=>{
    console.log(to, from);
})

export default router;